//
//  StatusBarColorManager.m
//  liukk
//
//  Created by liu on 2016/11/17.
//  Copyright © 2016年 liu. All rights reserved.
//

#import "StatusBarColorManager.h"

@interface StatusBarColorManager()
{
    UIWindow *_window;
    UILabel *_label;
}
@end

@implementation StatusBarColorManager

+(id)sharedStatusBarColorManager
{
    static StatusBarColorManager *_m = nil;
    if (!_m) {
        _m = [[StatusBarColorManager alloc]init];
        
    }
    return _m;
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        CGRect frame = [[UIScreen mainScreen]bounds];
        frame.size.height = 20;
        _window = [[UIWindow alloc]initWithFrame:frame];
        _window.backgroundColor = [UIColor blackColor];
        _window.windowLevel = UIWindowLevelStatusBar-1;
        [_window makeKeyAndVisible];
    }
    return self;
}

-(void)setWindowColor:(UIColor *)windowColor {
    _window.hidden = NO;
    _window.alpha = 1.0;
    _window.backgroundColor = windowColor;
}
@end
